using StudentVideo.Shared.Enums;

namespace StudentVideo.Common.Attributes;

[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Delegate, AllowMultiple = false)]
public class RoleAuthorizeAttribute(params RoleEnum[] allowedRoles): Attribute {
   public string Roles { get; set; } = string.Join(",", allowedRoles.Select(r => r.ToString()));
}
